<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/jsp/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>编辑用户——管理后台</title>
<%@ include file="/jsp/common/meta.jsp"%>
</head>

<body>
	<div id="container">
    	<%@ include file="/jsp/common/header.jsp"%>
        <%@ include file="/jsp/main/public/menu.jsp"%>
    	<s:set id="user" value="#request.single_user"/>
    	<form action="${ctx}/user/edit.action" method="post">
	    	<table class="list">
	    	   <tbody>
	    	       <tr>
	    	           <th align="right">用户名</th>
	    	           <td align="left">
	    	               <input type="text" disabled="disabled" value="${user.username}" class="txt" maxlength="20"/>
	    	               <input type="hidden" name="userVo.username" value="${user.username}"/>
	    	           </td>
	    	       </tr>
	    	       <tr>
	    	           <th align="right">密码</th>
	    	           <td align="left">
	    	               <input type="password" id="password" name="userVo.password" value="${user.password}" class="txt" maxlength="20"/>
	    	           </td>
	    	       </tr>
	    	       <tr>
	    	           <th align="right">邮箱</th>
	    	           <td align="left">
	    	               <input type="text" id="email" name="userVo.email" value="${user.email}" class="txt" maxlength="50"/>
	    	           </td>
	    	       </tr>
	    	       <tr>
	    	           <th align="right">状态</th>
	    	           <td align="left">
	    	               <s:if test="#session.user.userType != 'ADMIN'">
		    	               <s:if test="!#user.isDelete">
			    	               <input type="radio" disabled="disabled" checked="checked">正常 &nbsp;
			    	               <input type="hidden" name="userVo.isDelete" value="false">
		    	               </s:if>
		    	               <s:else>
			    	               <input type="radio" disabled="disabled" checked="checked">禁用 &nbsp;
			    	               <input type="hidden" name="userVo.isDelete" value="true">
		    	               </s:else>
	    	               </s:if>
	    	               <s:else>
		    	               <input type="radio" <s:if test="!#user.isDelete">checked="checked"</s:if> name="userVo.isDelete" value="false">正常 &nbsp;
		    	               <input type="radio" <s:if test="#user.isDelete">checked="checked"</s:if> name="userVo.isDelete" value="true">禁用
	    	               </s:else>
	    	           </td>
	    	       </tr>
	    	       <tr>
	    	           <th align="right">注册时间</th>
	    	           <td align="left">
	    	               <input type="text" value="${user.registerTime}" disabled="disabled" class="txt" maxlength="20"/>
	    	           </td>
	    	       </tr>
	    	       <tr>
	    	           <th align="right">上次登录</th>
	    	           <td align="left">
	    	               <input type="text" value="${user.lastLoginTime}" disabled="disabled" class="txt" maxlength="20"/>
	    	           </td>
	    	       </tr>
	    	       <s:if test="#request.errorMessage != null">
	    	       <tr>
	    	           <th align="right">&nbsp;</th>
	    	           <td align="left" class="red">${request.errorMessage}</td>
	    	       </tr>
	    	       </s:if>
	    	       <tr>
	    	           <th align="right">&nbsp;</th>
	    	           <td align="left">
	    	               <input type="submit" id="submit" value="提交"/> &nbsp; 
	    	               <input type="reset" id="reset" value="重置"/>
	    	           </td>
	    	       </tr>
	    	   </tbody>
	    	</table>
    	</form>
		<%@ include file="/jsp/common/footer.jsp"%>
	</div>
</body>
</html>
